# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=python-trio
pkgver=0.23.1
pkgrel=1
pkgdesc='A friendly Python library for async concurrency and I/O'
arch=(any)
url=https://github.com/python-trio/trio
license=(MIT)
depends=(
  python
  python-async_generator
  python-attrs
  python-exceptiongroup
  python-idna
  python-outcome
  python-sniffio
  python-sortedcontainers
)
makedepends=(
  git
  python-setuptools
)
provides=(python-multio-provider)
_tag=fa94d4cc1bf1a1619a09268cb06364a17bc6edbb
source=(git+https://github.com/python-trio/trio.git#tag=${_tag})
b2sums=(SKIP)

pkgver() {
  cd trio
  _version=$(git describe --tags | sed 's/^v//')
  echo "__version__ = '${_version}'" > trio/_version.py
  echo ${_version}
}

build() {
  cd trio
  python setup.py build
}

package() {
  cd trio
  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/python-trio/
}

# vim: ts=2 sw=2 et:
